foitzik.dev // my collection of random things and thoughts

Printing on nixOS

This is a short one, because I keep delaying my planned posts / do not find the time to finish them. My Linux printing experience was always great. This is probably thanks to CUPS. I have had the same printer for probably a decade (might be a lie). So I have sample size one but at least it is a constant "benchmark".

NixOS was the first distro where it did not work out of the box and was awkward. The awkward part is probably due to me using a (beta?) rather new desktop env/manager (COSMIC). But I love COSMIC. But I had to add and manage the printer via some web ui (http://localhost:631/printers/). Which you have to first know that it exists. The does not work out of the box part was:

# configuration.nix (nixosConfiguration)
  services.printing.drivers = [ pkgs.gutenprint ];

It is rather obvious once you check the nixOS wiki on printing. But it was a detour/inconvenience that was not obvious to me. Because I thought: I need CUPS, CUPS used to be installed on all Desktop Distro releases so everything should just work.

In the end it was not much of a hassle, but it took me 15-45 minutes to finally print something, mostly because I was running of in the wrong directions search-wise.